﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Courses
{
    public partial class courses : Form
    {
        /// <summary>
        /// 程序入口
        /// </summary>
        public courses()
        {
            InitializeComponent();
        }
        #region   //窗体加载
        /// <summary>
        /// 窗体
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void courses_Load(object sender, EventArgs e)
        {
            //生成当前时间
            time.Text = DateTime.Now.ToString("yyyy年MM月dd日 ,dddd"); 
        }
        #endregion


        #region   //菜单点击
        /// <summary>
        /// 菜单点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void 一键排课ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //一键排课实例化
            Scheduling scheduling = new Scheduling();
            scheduling.MdiParent = this;
            scheduling.Show();
        }

        /// <summary>
        /// 退出当前程序
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("你确定退出程序吗？", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
            {
                Application.Exit();
            }
        }
         #endregion


        /// <summary>
        /// 点击添加班级实验
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void 添加班级实验MToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //班级实验窗体实例化
            tb_shiyanclass shiyanclass = new tb_shiyanclass();
            shiyanclass.MdiParent = this;
            shiyanclass.Show();
        }

        /// <summary>
        /// 班级相关信息导入界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void 班级信息管理VToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //信息窗体实例化
            tb_banji banji = new tb_banji();
            banji.MdiParent = this;
            banji.Show();
        }

        /// <summary>
        /// 安排班级上课时间界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void 添加上课班级NToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //上课班级窗体实例化
            tb_shangkeClass shangkeClass = new tb_shangkeClass();
            shangkeClass.MdiParent = this;
            shangkeClass.Show();
        }

    }
}
